load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "deepcopy_generated.go",
        "defaults.go",
        "doc.go",
        "schema.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/virt-launcher/virtwrap/api",
    visibility = ["//visibility:public"],
    deps = [
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/precond:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "api_suite_test.go",
        "deepcopy_test.go",
        "defaults_test.go",
        "schema_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":go_default_library"],
    embedsrcs = [
        "testdata/domain_x86_64.xml.tmpl",
        "testdata/domain_ppc64le.xml.tmpl",
        "testdata/domain_arm64.xml.tmpl",
        "testdata/domain_numa_topology.xml",
        "testdata/cpu_pinning.xml",
    ],
    deps = [
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/google/gofuzz:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
    ],
)
